import http from "@/utils/http";

export function getProductByCategory(id) {
    return http({
        url: `/order/api/product/getByCategory/${id}`,
        method: 'get',
    })
}

export function getProductById(productId) {
    return http({
        url: `/order/api/product/getById/${productId}`,
        method: 'get',
    })
}

export const getSubCategoryGoodsAPI = (data) => {
    return http({
        url: '/api/category/goods/temporary',
        method: 'POST',
        data
    })
}

export const addProduct = (data) => {
    return http({
        url: '/order/api/product/add',
        method: 'POST',
        data
    })
}

export const autoReviewProduct = (data) => {
    return http({
        url: '/admin/api/product/review/auto',
        method: 'POST',
        data
    })
}


